<ul>
  <ng-container *ngFor="let item of data">
    <li nz-menu-item nz-tooltip *ngIf="item.children.length === 0" [routerLink]="item.link" nzPlacement="right"
      [nzTitle]="isCollapsed ? item.title : ''">
      <span title>
        <i nz-icon *ngIf="item.icon" [type]="item.icon" theme="outline"></i>
        {{item.title}}
      </span>
    </li>
    <li nz-submenu *ngIf="item.children.length !== 0">
      <span title>
        <i nz-icon *ngIf="item.icon" [type]="item.icon" theme="outline"></i>
        {{item.title}}
      </span>
      <app-menu-tree [data]="item.children"></app-menu-tree>
    </li>
  </ng-container>
</ul>